package com.chaosj.xml;

import cn.hutool.core.io.resource.ClassPathResource;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;

import java.nio.charset.Charset;
import java.util.Map;

/**
 * @className: RemoteClassAnalysisTool
 * @description:
 * @author: caoyangjie
 * @date: 2022/5/15
 **/
@Slf4j
public class RemoteClassAnalysisTool {

    public static void main(String[] args) {
        SAXReader reader = new SAXReader();
        try {
            Document document = reader.read(new ClassPathResource("/RpcRemoteClassDefine.xml").getReader(Charset.forName("UTF-8")));

        } catch (DocumentException e) {
            log.error(e.getMessage());
        }
    }

    @Data
    private static class RemoteClassEntry {
        private String id;
        private String name;
        private Map<String,RemoteClassEntry> attr;
    }
}
